package Message.Public
{
    import Framework.MQ.*;
    import Framework.Serialize.*;

    public class SPacket extends Object implements IMessageBase
    {
        public var entityId:SEntityId;
        public var mapId:int;
        public var loseDt:Date;
        public var point:SPoint;
        public var bossCode:int;
        public var captain:SPublicMiniPlayer;
        public var playerItem:Array;
        public const _type:int = 6;
        public static var _regist:SPacket = new SPacket(true);

        public function SPacket(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            
        }

        public function getType() : int
        {
            return this._type;
        }

        public function clone() : IMessageBase
        {
            return new SPacket();
        }

        public function __write(param1:SerializeStream) : void
        {
            this.entityId.__write(param1);
            param1.writeInt(this.mapId);
            param1.writeDate(this.loseDt);
            this.point.__write(param1);
            param1.writeInt(this.bossCode);
            this.captain.__write(param1);
            SeqPlayerItemHelper.write(param1, this.playerItem);
            
        }

        public function __read(param1:SerializeStream) : void
        {
            this.entityId = new SEntityId();
            this.entityId.__read(param1);
            this.mapId = param1.readInt();
            this.loseDt = param1.readDate();
            this.point = new SPoint();
            this.point.__read(param1);
            this.bossCode = param1.readInt();
            this.captain = new SPublicMiniPlayer();
            this.captain.__read(param1);
            this.playerItem = SeqPlayerItemHelper.read(param1);
            
        }

    }
}
